3.2.62 \(\int (a+b \sec (c+d x)) \sin ^3(c+d x) \, dx\) [162]

Optimal. Leaf size=58 \[ -\frac {a \cos (c+d x)}{d}+\frac {b \cos ^2(c+d x)}{2 d}+\frac {a \cos ^3(c+d x)}{3 d}-\frac {b \log (\cos (c+d x))}{d} \]

[Out]

-a*cos(d*x+c)/d+1/2*b*cos(d*x+c)^2/d+1/3*a*cos(d*x+c)^3/d-b*ln(cos(d*x+c))/d

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3957, 2916, 12, 780} \begin {gather*} \frac {a \cos ^3(c+d x)}{3 d}-\frac {a \cos (c+d x)}{d}+\frac {b \cos ^2(c+d x)}{2 d}-\frac {b \log (\cos (c+d x))}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[c + d*x])*Sin[c + d*x]^3,x]

[Out]

-((a*Cos[c + d*x])/d) + (b*Cos[c + d*x]^2)/(2*d) + (a*Cos[c + d*x]^3)/(3*d) - (b*Log[Cos[c + d*x]])/d

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 780

Int[((e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(e*x
)^m*(f + g*x)*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, e, f, g, m}, x] && IGtQ[p, 0]

Rule 2916

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x
, b*Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 3957

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Co
s[e + f*x])^p*((b + a*Sin[e + f*x])^m/Sin[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps

\begin {align*} \int (a+b \sec (c+d x)) \sin ^3(c+d x) \, dx &=-\int (-b-a \cos (c+d x)) \sin ^2(c+d x) \tan (c+d x) \, dx\\ &=\frac {\text {Subst}\left (\int \frac {a (-b+x) \left (a^2-x^2\right )}{x} \, dx,x,-a \cos (c+d x)\right )}{a^3 d}\\ &=\frac {\text {Subst}\left (\int \frac {(-b+x) \left (a^2-x^2\right )}{x} \, dx,x,-a \cos (c+d x)\right )}{a^2 d}\\ &=\frac {\text {Subst}\left (\int \left (a^2-\frac {a^2 b}{x}+b x-x^2\right ) \, dx,x,-a \cos (c+d x)\right )}{a^2 d}\\ &=-\frac {a \cos (c+d x)}{d}+\frac {b \cos ^2(c+d x)}{2 d}+\frac {a \cos ^3(c+d x)}{3 d}-\frac {b \log (\cos (c+d x))}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 57, normalized size = 0.98 \begin {gather*} -\frac {3 a \cos (c+d x)}{4 d}+\frac {a \cos (3 (c+d x))}{12 d}-\frac {b \left (-\frac {1}{2} \cos ^2(c+d x)+\log (\cos (c+d x))\right )}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[c + d*x])*Sin[c + d*x]^3,x]

[Out]

(-3*a*Cos[c + d*x])/(4*d) + (a*Cos[3*(c + d*x)])/(12*d) - (b*(-1/2*Cos[c + d*x]^2 + Log[Cos[c + d*x]]))/d

________________________________________________________________________________________

Maple [A]
time = 0.07, size = 47, normalized size = 0.81

method result size
derivativedivides \(\frac {b \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )-\frac {a \left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{3}}{d}\) \(47\)
default \(\frac {b \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )-\frac {a \left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{3}}{d}\) \(47\)
risch \(i b x +\frac {b \,{\mathrm e}^{2 i \left (d x +c \right )}}{8 d}+\frac {b \,{\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}+\frac {2 i b c}{d}-\frac {b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}-\frac {3 a \cos \left (d x +c \right )}{4 d}+\frac {a \cos \left (3 d x +3 c \right )}{12 d}\) \(90\)
norman \(\frac {-\frac {4 a}{3 d}-\frac {2 b \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {\left (4 a +2 b \right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {b \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) \(120\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(d*x+c))*sin(d*x+c)^3,x,method=_RETURNVERBOSE)

[Out]

1/d*(b*(-1/2*sin(d*x+c)^2-ln(cos(d*x+c)))-1/3*a*(2+sin(d*x+c)^2)*cos(d*x+c))

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 47, normalized size = 0.81 \begin {gather*} \frac {2 \, a \cos \left (d x + c\right )^{3} + 3 \, b \cos \left (d x + c\right )^{2} - 6 \, a \cos \left (d x + c\right ) - 6 \, b \log \left (\cos \left (d x + c\right )\right )}{6 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))*sin(d*x+c)^3,x, algorithm="maxima")

[Out]

1/6*(2*a*cos(d*x + c)^3 + 3*b*cos(d*x + c)^2 - 6*a*cos(d*x + c) - 6*b*log(cos(d*x + c)))/d

________________________________________________________________________________________

Fricas [A]
time = 3.66, size = 49, normalized size = 0.84 \begin {gather*} \frac {2 \, a \cos \left (d x + c\right )^{3} + 3 \, b \cos \left (d x + c\right )^{2} - 6 \, a \cos \left (d x + c\right ) - 6 \, b \log \left (-\cos \left (d x + c\right )\right )}{6 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))*sin(d*x+c)^3,x, algorithm="fricas")

[Out]

1/6*(2*a*cos(d*x + c)^3 + 3*b*cos(d*x + c)^2 - 6*a*cos(d*x + c) - 6*b*log(-cos(d*x + c)))/d

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sec {\left (c + d x \right )}\right ) \sin ^{3}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))*sin(d*x+c)**3,x)

[Out]

Integral((a + b*sec(c + d*x))*sin(c + d*x)**3, x)

________________________________________________________________________________________

Giac [A]
time = 0.46, size = 66, normalized size = 1.14 \begin {gather*} -\frac {b \log \left (\frac {{\left | \cos \left (d x + c\right ) \right |}}{{\left | d \right |}}\right )}{d} + \frac {2 \, a d^{2} \cos \left (d x + c\right )^{3} + 3 \, b d^{2} \cos \left (d x + c\right )^{2} - 6 \, a d^{2} \cos \left (d x + c\right )}{6 \, d^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))*sin(d*x+c)^3,x, algorithm="giac")

[Out]

-b*log(abs(cos(d*x + c))/abs(d))/d + 1/6*(2*a*d^2*cos(d*x + c)^3 + 3*b*d^2*cos(d*x + c)^2 - 6*a*d^2*cos(d*x +
c))/d^3

________________________________________________________________________________________

Mupad [B]
time = 0.06, size = 45, normalized size = 0.78 \begin {gather*} -\frac {a\,\cos \left (c+d\,x\right )-\frac {a\,{\cos \left (c+d\,x\right )}^3}{3}-\frac {b\,{\cos \left (c+d\,x\right )}^2}{2}+b\,\ln \left (\cos \left (c+d\,x\right )\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(c + d*x)^3*(a + b/cos(c + d*x)),x)

[Out]

-(a*cos(c + d*x) - (a*cos(c + d*x)^3)/3 - (b*cos(c + d*x)^2)/2 + b*log(cos(c + d*x)))/d

________________________________________________________________________________________